package com.example.teacher;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableDiscoveryClient //nacos注册
@EnableFeignClients(basePackages = {"com.example.servicebase.client"})
@EnableTransactionManagement
@EnableCaching
@ComponentScan(basePackages = {"com.example"})
public class ServiceTeacherApplication {

    public static void main(String[] args) {
        // 解决elasticsearch启动保存问题
        System.setProperty("es.set.netty.runtime.available.processors", "false");

        SpringApplication.run(ServiceTeacherApplication.class, args);
    }
}
